package cn.hongwei.nacos;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author Great
 * @email 1224028994@qq.com
 */
@SpringBootApplication
public class NacosConfigApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(NacosConfigApplication.class, args);
        String name = applicationContext.getEnvironment().getProperty("data.name");
        String age = applicationContext.getEnvironment().getProperty("data.age");
        System.out.println("name = " + name);
        System.out.println("age = " + age);
    }
}
